package com.pinyoumei.app.adapter;

import android.support.annotation.Nullable;

import com.pinyoumei.app.R;
import com.pinyoumei.app.bean.BalanceBean;
import com.pinyoumei.app.view.SDAdaptiveTextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by Administrator on 2021-09-07.
 * --------- 日期 ------- 维护人 ------------ 变更内容 --------
 * 2021-09-07        Administrator             新增Person类
 * 2021-09-07        Administrator             增加sex属性
 */
public class BalanceAdapter extends BaseQuickAdapter<BalanceBean.ResultBean.OrderListBean, BaseViewHolder> {
    public BalanceAdapter(int layoutResId, @Nullable List<BalanceBean.ResultBean.OrderListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BalanceBean.ResultBean.OrderListBean item) {
        SDAdaptiveTextView tv_order_no = helper.getView(R.id.tv_order_no);
        tv_order_no.post(new Runnable() {
            @Override
            public void run() {
                tv_order_no.setAdaptiveText("订单编号：" + item.getOrder_no());
            }
        });
        
        helper.setText(R.id.tv_pay_type,item.getPay_type());

        helper.setText(R.id.tv_order_status_desc,item.getOrder_status_desc());

        helper.setText(R.id.tv_order_time,"充值时间：" +item.getOrder_time());

        helper.setText(R.id.tv_order_real_price, item.getOrder_real_price() + "元");
    }
    
 
    
    
}
